package phapp.dao.data;

import java.util.List;
import java.util.Map;

import cn.org.rapid_framework.page.Page;
import cn.org.rapid_framework.page.PageRequest;
import org.springframework.stereotype.Component;

import javacommon.base.BaseIbatis3Dao;
import phapp.model.data.*;

/**
 * Title: t_qfdtext_data 数据处理层 Description :
 * 执行./mapper/的QfdtextMapper.xml的相应SQL语句 Copyright: Copyright (c) 2012-10
 * Company:
 * 
 * @author you name
 * @version 1.0
 */

@Component
public class QfdtextDao extends BaseIbatis3Dao<Qfdtext, java.lang.Integer>
{

   public Class getEntityClass()
   {
      return Qfdtext.class;
   }

   public void saveOrUpdate(Qfdtext entity)
   {
      if (entity.getTextId() == null) save(entity);
      else update(entity);
   }

   /**
    * <p>
    * 批量删除<br>
    * Description :
    * 
    * @param Qfdtext
    *           u
    * @return int
    * @author
    */
   public int removeByIdArry(Qfdtext u)
   {
      int i = -1;
      i = delete("Qfdtext.removeByIdArry", u);
      return i;
   }

   /**
    * <p>
    * 分页查询<br>
    * Description :
    * 
    * @param PageRequest
    *           pageRequest
    * @return Page
    * @author
    */
   public Page findByPageRequest(PageRequest pageRequest)
   {
      return pageQuery("Qfdtext.pageSelect", pageRequest);
   }

   
   public List findByDayLevel(Map map)
   {
      List listResult = getSqlSessionTemplate().selectList("Qfdtext.findByDayLevel", map);
      
      return listResult;
   }
   
}
